<?php
namespace NatalPHP\Tests\HTML;
/* SVN FILE: $Id: html_tests.php 54 2010-01-11 00:56:26Z Sadjow $ */
/**
 * HTML classes tests.
 *
 * NatalPHP (tm) :  Sufficient and Simple Framework (http://www.trycatch.com.br)
 * Copyright 2010 Sadjow Medeiros Leão <sadjow[at]gmail.com>,
 * Waldson Patricio <waldsonpatricio[at]gmail.com
 *
 * Licensed under The MIT License
 * Redistributions of files must retain the above copyright notice.
 *
 * @filesource
 * @copyright     Copyright 2010 Sadjow Medeiros Leão <sadjow[at]gmail.com>,
 *                Waldson Patricio <waldsonpatricio[at]gmail.com
 * @link          http://www.trycatch.com.br Natal(tm) Project
 * @package       NatalPHP
 * @subpackage    NatalPHP.NatalPHP.Tests.View.HTML
 * @since         NatalPHP(tm) v 0.1
 * @version       $Rev: 54 $
 * @modifiedby    $LastChangedBy: Sadjow $
 * @lastmodified  $Date: 2010-01-11 00:56:26 +0000 (Mon, 11 Jan 2010) $
 * @license       http://www.opensource.org/licenses/mit-license.php The MIT License
 */
//Require the file of Element class.
require_once('../../../Library/View/HTML/Element.php');
require_once('../../../Library/View/HTML/DoctypeFactory.php');
require_once('../../../Library/View/HTML/Area.php');
require_once('../../../Library/View/HTML/Audio.php');
require_once('../../../Library/View/HTML/A.php');
require_once('../../../Library/Base/NatalPhpSingleton.php');
require_once('../../../Library/Util/Inflector.php');
use NatalPHP\View\HTML;
use NatalPHP\Util;

echo HTML\DoctypeFactory::Create(HTML\DOCTYPE_HTML5);

// Create a new element and tests the funcionality.
$a = new HTML\A();
$a->attr('href', 'http://www.trycatch.com.br');
$a->attr('title', 'TryCatch');
$a->content('TryCatch Site!');
$a->beforeContent('Inicio ');
$a->afterContent(' Final');
$a->rattr('title');
$a->attr(HTML\ATTR_TITLE, 'Teste');
echo $a;
echo $a->title();
echo $a->title(' novo ')->title();

$audio = new HTML\Audio('habit.mp3', true, 'Your browser not support this audio tag.');
echo $audio;
/*
$i =  Util\Inflector::getInstance();

echo $i->teste();
*/

function t() {
static $i = 0;
$i += 1;
echo $i;
}

t();
t();
t();
